package com.wangyb.wework.controller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.wangyb.wework.bo.WwGroupchatMemberQueryBo;
import com.wangyb.wework.service.contact.IWwGroupchatMemberService;
import com.wangyb.wework.vo.WwGroupchatMemberVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: wangyb
 * @Date: 2021/7/9 4:42 下午
 */
@Api(value = "客户群成员 控制器", tags = {"客户群成员 管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/wework/groupchatMember")
public class WwGroupchatMemberController extends BaseController {
	@Autowired
	private IWwGroupchatMemberService iWwGroupchatMemberService;
	/**
	 * 查询客户群成员 列表
	 */
	@ApiOperation("查询客户群成员 列表")
	@PreAuthorize("@ss.hasPermi('wework:groupchatMember:list')")
	@GetMapping("/list")
	public TableDataInfo<WwGroupchatMemberVo> list(@Validated WwGroupchatMemberQueryBo bo) {
		if (bo == null){
			bo = new WwGroupchatMemberQueryBo();
		}
//		bo.setGroupchatId(groupchatId);
		return iWwGroupchatMemberService.queryPageList(bo);
	}
}
